6  Appendix C

6.1 Install Packages

We install the following packages using the groundhog package manager to increase computational reproducibility.

options(repos = c(CRAN = "https://cran.r-project.org")) 

if (!requireNamespace("groundhog", quietly = TRUE)) {
  install.packages("groundhog")
}

pkgs <- c("ggplot2", "lmtest", "sandwich")

groundhog::groundhog.library(pkg = pkgs,
                             date = "2024-08-01")

rm(pkgs)

6.2 Figure C.1

We examine the heterogeneous effects by estimating a triple interaction effect regression:

\[ \begin{aligned} y_{it} = &\ \alpha_{\text{baseline}} + \sum_{\text{treat}} \alpha_{\text{treat}} \text{treat}_i + \beta_{\text{baseline}} \text{part2}_t + \sum_{\text{treat}} \beta_{\text{treat}} \text{treat}_i \times \text{part2}_t \\ &\ + \theta_{\text{baseline}} (D_i \times \text{part2}_t) + \sum_{\text{treat}} \theta_{\text{treat}} (D_i \times \text{treat}_i \times \text{part2}_t) \\ &\ + \delta_{\text{baseline}} D_i + \sum_{\text{treat}} \delta_{\text{treat}} (D_i \times \text{treat}_i) + \gamma X_i + \epsilon_{it} \end{aligned} \]

The figure C.1a displays the estimators \(\beta_{treat}\) and \(\theta_{treat}\). The triple interaction effects \(\theta_{treat}\) are labelled with education DDD, temperature DDD, forecast usage DDD, credible DDD, accurate DDD, and female DDD in this case. The double interaction effects \(\beta_{treat}\) are labelled with lower education, lower temperature, less forecast usage, less credible, less accurate, and not female in this case. For example, to determine the total treatment effect for female on \(b\) , one must add the estimators \(\beta_{treat}\) (\(b\) (not female)) and \(\delta_{treat}\) (\(b\) (female DDD)). The same principle can be applied to the other two figures.

In figure C.1a, we pool across the different information treatments (interval, best guess, both) and only consider the heterogeneous effect of contradiction vs. confirmation. treat refers to contradiction while confirmation is used as the baseline.

In figure C.1b and C.1c, we test the heterogeneous effects of the different information treatments (interval, best guess, both) separately for confirmation and contradiction treatment arms. The best guess information treatment serves as the baseline and treat refers to the information treatments interval or both.

To recreate the Figure, we source an R script, which you can find here.

source(file = "06-Appendix-C-fig-1.R", echo = FALSE)

The script generates the corresponding ggplots and saves them as PDF files in ../rendered_documents/pdf/.

Session Info

sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-apple-darwin20
Running under: macOS Sonoma 14.4.1

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Zurich
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] sandwich_3.1-0 lmtest_0.9-40  zoo_1.8-12     ggplot2_3.5.1 

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5       cli_3.6.3         knitr_1.48        rlang_1.1.4      
 [5] xfun_0.46         generics_0.1.3    jsonlite_1.8.8    labeling_0.4.3   
 [9] glue_1.7.0        colorspace_2.1-1  htmltools_0.5.8.1 scales_1.3.0     
[13] fansi_1.0.6       rmarkdown_2.27    grid_4.4.1        evaluate_0.24.0  
[17] munsell_0.5.1     tibble_3.2.1      fastmap_1.2.0     yaml_2.3.10      
[21] lifecycle_1.0.4   compiler_4.4.1    dplyr_1.1.4       pkgconfig_2.0.3  
[25] htmlwidgets_1.6.4 rstudioapi_0.16.0 farver_2.1.2      lattice_0.22-6   
[29] digest_0.6.36     groundhog_3.2.0   R6_2.5.1          tidyselect_1.2.1 
[33] utf8_1.2.4        pillar_1.9.0      parallel_4.4.1    magrittr_2.0.3   
[37] withr_3.0.1       tools_4.4.1       gtable_0.3.5